package com.example.domet.service.impl;

import com.example.domet.bean.Dept;
import com.example.domet.mapper.DeptMapper;
import com.example.domet.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    private DeptMapper deptMapper;

    @Autowired
    public void setDeptMapper(DeptMapper deptMapper) {
        this.deptMapper = deptMapper;
    }

    @Override
    public List<String> listAllDeptName() {
        return deptMapper.ac();
    }

    @Override
    public String bumenchaxun(Integer a) {
        return deptMapper.selectByPrimaryKey(a).getDeptName();
    }

    @Override
    public List<Dept> selectAll() {
        return deptMapper.selectAll();
    }
}
